package com.design.FactoryVSStrategy.factory;

/**
 * @author liangxin
 * @since 27/06/2019
 */
public class ClientFactory {
    public static void main(String[] args) throws Exception {
//        Scanner scanner = new Scanner(System.in);
//        System.out.print("输入运算符：");
//        char operation = scanner.next().charAt(0);
//        Operation op = OperationFactory.createOperate(operation);
        Operation add = FactorySimple.createOperation("+");
        Operation sub = FactorySimple.createOperation("-");
        System.out.println(add.getResult(1, 1));
        System.out.println(sub.getResult(1, 1));
    }
}
